import {RouteRecordRaw} from "vue-router";
import  {RouterTransition} from '@/components/transition'
//tips：markRaw - 添加不可转为响应式数据的标记
import {markRaw} from 'vue';

const routeName = 'error';

export const notFound ={
    path:'/:pathMatch(.*)*',
    name:'NotFound',
    redirect:'error/404',
    component: ()=> import('@/views/shared/error/404.vue')
}

export const errorRoutes ={
    path:'/error',
    name:routeName,
    redirect: '/error/404',
    component:markRaw(RouterTransition),
    meta:{
        title:'错误页',
        icon:'EditOutlined',
        hidden:true
    },
    children:[
        {
            path:'404',
            name:`${routeName}-404`,
            meta:{
                title:'404',
                icon:'UserOutlined'
            },
            component: ()=>import('@/views/shared/error/404.vue')
        }
    ]
}